﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OF.Utility
{
    public class SendMessageDictionary
    {

        public static string GetMsgContent(SendMessageContent entity, MessageType msgType)
        {
            string szTpl = "";
            switch (msgType)
            {
                case MessageType.个人_支付后:
                    //return "尊敬的车主，您的车务订单已下单成功，稍后我们的客服人员会与您联系并将为您安排车务顾问，请保持电话畅通，客服热线：400-875-6066。";
                    //2017-12-6 电销提出变更回拨电话，PM更改文案
                    return "尊敬的车主，您的车务订单已下单成功，稍后客服人员会与您联系并将为您安排车务顾问，请保持电话畅通，客服热线：010-56592101。";
                case MessageType.个人_分配顾问后:
                    return "尊敬的车主，您的车务订单由车务顾问" + entity.CounselorName + "" + entity.CounselorMobile + "为您服务，稍后他会同您取得联系，请保持电话畅通。";
                case MessageType.个人_评价中:
                    return "尊敬的车主，您的车务订单已经办理完毕，请您在微信公众号“我的订单 ”里作出评价，感谢您的信任和支持。";
                case MessageType.顾问_审核通过后:
                    return "您上传的照片已审核通过，" + entity.OrderPrice + "元款项于次日打入您的微信账户中，注意查收款项，如有问题联系您的客户经理" + entity.CustomerServiceManager + entity.CounselorName ;
                case MessageType.顾问_商家下单后:
                    return "您的车商伙伴" + entity.CounselorMobile + "，下了一个" + entity.BusinessTitle + "订单（编号：" + entity.OrderId + "），金额" + entity.OrderPrice + "元，额外获得斑马车务平台奖励10元，合计" + (EConvert.ToDecimal(entity.OrderPrice) + 10) + "元，请及时办理手续，手续办完通过斑马车务公众号上传照片：过户前行驶证、过户后的登记证前6页，行驶证，过户票，保单，买、卖双方身份证正反面照片，车辆左前45度照片。";
                case MessageType.商家_分配顾问后:
                    return "车商大人：您的本市过户订单（编号：" + entity.OrderId + "）已经提交成功，车务顾问" + entity.CounselorName + entity.CounselorMobile + "已经接单并火速办理，我们将在第一时间催办，请您耐心等待。";
                case MessageType.商家_审核通过后:
                    return "车商大人：您的" + entity.BusinessTitle + "订单（编号：" + entity.OrderId + "）已经办理完毕，车务顾问" + entity.CounselorName + entity.CounselorMobile + "感谢您的支持，额外获得了平台10元奖励，如有需要，随时招呼小斑马。400-875-6066或者联系您的客户" + entity.CustomerServiceManager + entity.CustomerServiceMobile ;
                case MessageType.顾问_代下单:
                    return "尊敬的车主，您的"+ entity.BusinessTitle + "已经下单成功，订单编号"+ entity.OrderId + "，车务顾问" + entity.CounselorName + entity.CounselorMobile + "为您服务,办理日期"+ entity.OrderHandDate + ",期间请保持电话畅通。";
                case MessageType.顾问_添加时:
                    szTpl = "车务顾问{0}，您在斑马车务的账户已经开通，账号：{1}，初始密码：{2}。请通过斑马车务微信公众号登录。";
                    string szMsg=string.Format(szTpl,entity.CounselorName,entity.CounselorMobile,entity.Password);
                    return szMsg;
                case MessageType.顾问_订单分配顾问:
                    szTpl = "用户{0}（{1}）于{2}办理{5}业务，订单编号{3},金额{4}。请联系用户及时办理，办理完成通过斑马车务公众号上传照片：过户前行驶证、过户后的登记证前6页，行驶证，过户票，保单，买、卖双方身份证正反面照片，车辆左前45度照片。";
                    return string.Format(szTpl, entity.UserName, entity.UserMobile,entity.OrderHandDate, entity.OrderId,entity.OrderPrice,entity.BusinessTitle);
               
            }

            return string.Empty;
        }

    }

    public class SendMessageContent
    {
        public long OrderId { get; set; }

        public string UserMobile { get; set; }

        public string UserName { get; set; }

        public string BusinessTitle { get; set; }

        public string CounselorName { get; set; }

        public string CounselorMobile { get; set; }

        public string CustomerServiceManager { get; set; }

        public string CustomerServiceMobile { get; set; }

        public string OrderPrice { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        public string OrderHandDate { get; set; }

    }

    public enum MessageType
    {
        个人_支付后 = 1,
        个人_分配顾问后 = 2,
        个人_评价中 = 3,
        顾问_商家下单后 = 4,
        顾问_审核通过后 = 5,
        商家_分配顾问后 = 6,
        商家_审核通过后 = 7,
        顾问_代下单=8,
        顾问_添加时 =9,
        顾问_订单分配顾问 = 10,
        商务平台_添加员工=11,
        商务平台_重置密码=12

    }
}
